package com.yy.demoai.aiservice;

import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class AssistantController {
    @Resource
    private Assistant assistant;

    @GetMapping("/assistant")
    public String assistant(@RequestParam String sessionId,@RequestParam(value = "message", defaultValue = "你好") String message) {
        return assistant.chat(sessionId,message);
    }
}
